<script setup lang='ts'>
import { } from "vue"

const props = defineProps({
    bookinfo: {
        type: Object,
    }
})
</script>

<template>
    <li class="fourth" v-if="props.bookinfo">
        <div class="left">
            <img v-lazy="props.bookinfo.cover + '?imageView&thumbnail=240y336'" alt="">
        </div>
        <div class="right">
            <h3>{{ props.bookinfo.title }}</h3>
            <span>{{ props.bookinfo.category }}</span>
            <div class="watched">
                <img src="@/assets/imgs/眼睛1.png" alt="">
                <span>{{ (props.bookinfo.clickCount / 10000).toFixed(1) }}万</span>
            </div>
        </div>
    </li>
</template>

<style lang="less" scoped>
.fourth {
    width: 45%;
    display: flex;
    align-items: center;
    margin-bottom: 15rem;
    justify-content: left;

    .left {
        margin-right: 10rem;

        img {
            width: 70rem;
            height: 98rem;
            box-shadow: 0 0 5rem 1rem #ccc;
        }
    }

    .right {
        flex-grow: 1;

        h3 {
            width: 100%;
            font-size: 14rem;
            color: #000;
            display: -webkit-box;
            -webkit-box-orient: vertical;
            text-overflow: ellipsis;
            overflow: hidden;
            -webkit-line-clamp: 2;
        }

        >span {
            color: #666;
        }

        .watched {
            display: flex;
            align-items: center;

            img {
                width: 18rem;
                margin-right: 5rem;
            }
        }
    }

}
</style>
